Only resetting form after error