Fixed bug related to update