fixed issue with paste function