fix for ntheader and filehandle