Updated logic to persist header info.