do not write empty string fields. fixes #371