fix for 0 result query
Merge pull request #378 from nlake44/dbfix

fix for 0 result query