Fix a bug in line mapping for comparator.