Resolved Issue #2898

This fix resolve the Issue described in #2898.
Add unit tests to cover affected methods.