Comparator contract bug?