More robust multiprocessing version