Make Java 6 compatible