Fixed PasteAction code