code fix for single fsm