fixing bug with not using the right random seed