Added workaround for Python bug in multiprocessing - fixed own bug