Fix bug in task progress update.