Few more adjustments in porting C# to Java