CC-5808: Fixed breakage at shutdown