Merge pull request #4 from domenicoficca/master

Fix to prevent queries without database