Completed workaround for multiprocessing