Adding more checks on headers