Fixed a bug with deleting profiles.