Fixed crash if no tasks are running