Fix bogus redirect on error