added more unit tests and fixed bug when no activeProfile's are present in settings