fix cost balancing so assignment/balancing doesn't get stuck