Fixed query bug & added queries
Merge branch 'master' into development