handle empty profiles
Merge pull request #1 from tuulos/master

Handle empty profiles