Fix error reporting a bit