fix link rand()