Random variable changed to volatile