Fixing up the profile editing logic