Fix unbalanced transitions error

Fixes 1 of the issues in #9