Final fix for compareTo