[Engine-XMPP] hooks caused NullReferenceExceptions when used with xmpp