Data loss after modifying a form