Fix AGSTATE parsing.
Merge pull request #31 from MOARdV/master

Fix AGSTATE parsing.