Bad state-machine version