fix #2360 and CreateQuery
Merge pull request #9 from Asetss/master

fix #2360 and CreateQuery