avoid checking the same taskid several times