compatibility fix for java 6