XEP handling updated