Minor fixes because of invisible types in JRE7 which are visible in JRE8