Fixed bug with update