fix multiprocessing issue