fix bug in copy buttons and rename files