Fix the form reset bug