Fix error reporting.

Because I'm dumb apparently :(