Adapt to rand changes