Fix bug when editing profiles