fix paste bug to allow 'matrix' objects