Fix errors after path kernel to 3.4.88 and random.c improvment