Fixed mistaken query