Small bug fixes, a little rebalancing.