fixing typo - misplaced query