handle shortstr in _write_item