fixed issue of fsm not matching