exchange Platform.flush for deprecated dirtyCheck