Query syntax fixed