attribute cleanup when pasting