fixed Java 7 compatibility issue