fixing reference to wp_query