Attempt to fix data loss during session end