fixing input old values in editing and creating objects