Fix writedata_by_id. Fix spsym.