fix Thread class