Fixed core dump, when printing headers