Fixes task retrying.