fix bug of update.