fixed save bug when items are edited.