fixed issue when task_id is not the same as the sample_id