Fixing java 6 based compiler issues