Fixed user profile update bugs and tests