Modify bug in rand() and modify the Makefile