Fix minor errors in population script