fixed compareTo issue