add protections against events with no PF candidate and other weird things