It seems like the logic for stop_all_periodic_tasks in bus.py removes each task from self._periodic_tasks as it goes through the loop. But if it removes and increments each time through it would skip every other task (if the remove_task flag is true).