Fixed bug in test_fsm.