Fix 'unsaved changes' incorrectly showing after save