Rebased hotfix from master for string-casting comparison issue