Fixed various paste related issues.