Fixed bugs in population.