Fixed compatibility issue in Java 1.7