Fixes the normalizeHeaders private method.