fix how to parse extensions header