Changed the copy paste function
Change the copy paste to work in GUI mode