fix race condition where StopHandlingRunOnce can be called before the channel it needs to write on has been saved