I really hate when things act weird. Bane of my existence. I hope it stops acting weird for you.
How to report your problem productively in the Unity3D forums:
How to understand compiler and other errors and even fix them yourself:
https://discussions.unity.com/t/824586/8
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: https://discussions.unity.com/t/481379
Also, consider this:
https://www.youtube.com/watch?v=84kaypWK1bM