fix a bug in profile editing