fixed null reference error when deleting original thread