Improved header handling.