minor bug fixes in COPY INTO cod