Better handle multiple databases if no queries were run on the last one

If the last db checked didn't have any queries, the profiler was showing no queries at all.
Merge pull request #17 from Dianoga/patch-1

Better handle multiple databases if no queries were run on the last one