fixed java 6 compatibility issue