Fixed the generation of random population