Fix for handling empty profiles.