fixed edit profile error handling