Fixed issue when pasting multiline text.