Fixes to properly handle saving of edits.