Solved a bug in the time random generator.