Fixed missing random generation