Added some JAVA 6 compability