Fixed bug on update