Fix logic for thread get