[mod] remove trailing space when saving