Fix for java 6