fixed bug that could cause a character to be dropped from the parentString