Correct the radom method

Signed-off-by: Ajax Chai <ajaxchai@gmail.com>