multithread copy + minor bug fix