Fixed a typo in a query refs #1287