Forgot to add main query to the where string