Changed thread safe random
ThreadSafeRandonm fix