Some cleanup in state.py.

This line might be the source of problems.