fix bug when no profile already exists
Merge pull request #25 from Anthony25/master

Fix bug when no profile exists