preserve allowed calsses while pasting