ensure we call substr on a string object
Merge pull request #8 from amaierhofer/fix_substr_typeerror

ensure we call substr on a string object