fix bugs in header