fix bug in profile update