Correct a bug where the wrong task ID was being used.