Foxed stuff in rand() and main code.