fix crash when header is missing