Fix query + debug
Merge pull request #154 from dreamteam69/master

Fix query + debug