Fix incorrect wrapping when pasting, etc.