Fixed setup and usage of profiles.