Fixed a error in update