Fixed comparator warning
Warning: Sort comparators should not return a boolean since it may result in a different sort order than expected. The comparator should return an integer or double (negative if left is less than right, positive if left is greater than right, zero otherwise).