Corrected how queries using AND work