Revert "Fixed text paste bug."

This reverts commit 132fb46096b9f4ce71d05e9906f7fee2cecd550d.
Found better fix for the problem.