Fix undefined State object
Merge pull request #151 from ykzts/fix-undefined-state-object

Fix undefined State object