Restored compatibility with Java 6