Why does my form keep freezing when I try to enter an amount?