Fixed bugs caused by mtlSubstring/mtlChars merge