Fixed compilation. Java compiler needs additional cast.