Minor change to how data is transferred to worker threads to ensure that there is nothing on the heap being accessed during use