Make Random thread safe