Moved state hash out of condition, makes Pylint happier.