[fix] fixed problem  with the task infinite loop

next problem apperead with some outdated tasks it seems that the heap is broken for some reason