Passed proper argument to rand()