fixing copy operation