fixed callback assignment for returned query