Fix problem with Java 6