found the failure. had to set the counter 0 after the tasks are finish