fixed: copy ends with error code 1 or 4