fix bug with validation on update