simplify get-instance-name when word-index is string
Merge pull request #871 from williampma/r2l-simplify

simplify get-instance-name when word-index is string