removed mistake ending to distance query