Made compatible with Java 6 :(