fix up bug in randomness again