fixed some population bugs