fix COPY_LEN important bug