Made it work with Java 8