Fixed Random Generating Bugs.