A couple of fixes for Oracle's JDK8