Why does my form keep changing dimensions randomly whenever a change is made?