fixes for custom_headers