fixed a typo in query