added some Random.atfork in critical sections trying to cover some bugs.