Fix wrong prototype of query objects.