Fixed issue where zombie threads were running wild