minor bugfixes for deleting all and pasting