fix bug in update profile