fix for invalid headers