Making it work on Java 1.6