Bugfix and simplify transitions