Fix transitions, tests