modify text to resolve formatting issues