fsm type detection not working