Fixed bug that failed to recognize the correct header type.