Fixed Java 6 compatibility issue