Fix bug with breaker closing. Add test for breaker closing