Fix using Java 8 API