fix bug on update