Data context lifetime fix