minor error in query