Tweaks to circuit breaker code