Fixed compilation issue for some java versions