Fixed thread delete.