Fixed a bug in the CONFIG HEADER writing