Fix issues with pasting, closes #219, closes #205