fix bug on task counter