Fix runtime problem on Java 7