Fix modified status when saving