Fix the standard key comparison function, closes #29.