fixed bugs in the edit profile.