1. Fix three serious bugs in the comparison code.