Fix bugs in arg/state magic (#547)
Merge pull request #4 from pagekite/master

Fix bugs in arg/state magic (#547)