Made Java 7 compatible