Fixed bug in copy command.