bugfix sorting compatible with Java 7