Fix bugs on profile update