Fix chained comparisons.