Fix bug in identity comparator