Fix for CARBON-14767
Refactored the fix
Merge branch 'isuruwan-master'
Merge pull request #81 from arunasujith/master

Fix for CARBON-14767