Adjustments for Java 6