Fixes for Issue, Id : TOOLS-2526

This fix includes changes in two Java classes