fixing build for Java 8