Ensure state keys are defined before they are used.
Merge pull request #53 from nicksay/fix-deps-key

Ensure state keys are defined before they are used.