final fix for illegalCharacters