Make Random simulation thread safe
This ensures that simulations are reproducable