Fixed bad status code on error.