Fix last thread link bug