fix error-header sending