Fixed the update bug