Fix variable typo in handling of source disconnection