2d query build problem fix
Merge pull request #481 from nisin/2dquery

2d query build problem fix