java 6 compatibility; fixes