fixed a query