Fix to support Java 6