fixed header writing
fixed header