Fixed quesries for 1D, added check for working queries
Merge branch 'vcs_queries' into devel