Fixed the NPE that JoinEvent will cause