Java 6 compatibility fix