Fix transition

This is needed to have proper state machine. Part of  #73, but separated to allow merging. **This is needed for me to work.**