Fix a bug where events referenced todos that were missing