Correct some issues with COPY directive