Better randomization for tests