Fixed the randomness - hopefully