bugfix: the new code for copying byte arrays could cause overruns of the capture buffer