Fixed the transitions not looping between states.