some fixes for new ejabberd