Some contemporary Java 7 fixes