Fix QUERY result bug