Fix state-machine bug