fix bug and can save data