fixed bug where errors would not be parsed correctly