Fix bug that produced spurious nil state.