Fix annoying rand() bug

Only put srand(time(0)) once at the start of the main method