Fix bug in update_user