Fixed a query that was broken