fix issue when task delay = 0