Fixed bug with empty WHERE clauses