fix passing data to worker thread