Fixed some bugs with the FSM