refs #26

Improved fix for incorrect error parsing.