Fix the tests to fail correctly as removing branches is broken
And fix