Fix various cases of where clauses.