fixed bug in query