added basic error handing, the parsing should work now. fixes #10