fix reset form on refresh when errors detected