Fix error headers becoming permanent between errors