added panic on invalid state machine impl