wrong variables names fix in compareTo()