prevent crash when header is empty