How to fix not connected to field errors