Fixed to run with JDK 1.6