Invalid state

See inline comments/questions.