Made Java 6 compatible