Bug fix to crash in tco_shutdown