fixed based on latest ejabberd