Fix saving bug when changing records.