Improve error stanza parsing

Fixes #16