fix bug in rand-gen.c, update pdf to match