Added setting of random seed.