fixed bug in append_header

2 jobs for main