Added Java 8 compatibility.