correctly retrieve headers