get rid of duplicate 'minzu'.
netz: fix small memory leak.
netz: make sure header gets initialized.
png: fix bug in error case