Fixed compilation errors with Java 1.6