Collection sort fix for Java 6/7 users.