fixed bug with the comparison operator in query