Add fix for Java 7