Fixed build for Java 8