Merge pull request for the fix for IDENTITY-2654 provided by Chamil

Merge pull request for the fix for IDENTITY-2654 provided by Chamil