Update the copy paste function.