Bug fix with rich text formatting