fixes for multiprocessing