fix a warning when saving without reference one