Why is the form not resetting after it has been submitted?