Changed to Java 6 compatibility.