Changes made in form does not save properly