fixes #5996 set default header/footer on early save