Fixes for JDK8