made multiprocessing mode safe for windows