Change how the WHERE clause is built