fix: when no tasks are running, monitor causes crash