fix a bug with population selection