Removed reference to global scope when parsing query