Change rand() to arc4random()

WTF was I thinking?