Fix bug with profile updating