Fixed all the java6 compat issues