Make the header logic work better