Fix #77 - Solved problem with empty database.
Merge pull request #78 from vreixo/issue77

Fix #77 - Solved problem with empty database.