header first bug fix