fixed the random issue