Fix Query syntax issue