fix the update bug