Fixed a bug if trying to connect to a pre-existing profile.