Fixes race condition on multiprocess testing