fix changes due to rollback to Java 6