fix save and rename issue