Fix curly brackets around last srand if-statement