Fixing a small bug when updating profiles