Fixed compilation problems with Java 6