random: tweaking

credits to dorimanx

Change-Id: Id7f288c6c6e872631af8aa056c2b584fd5fb87c7
Signed-off-by: zwliew <zhaoweiliew@gmail.com>