Add an additional exit condition for quicker convergence
Fix sex selection off by one