fix text formatting problems