Fixed checking "state" rather than "engine.state".