fix subString in core/debug