Why copied text is not properly formatted?