fixing the broken substrings, again