fix New and Save bug