Fix proposal for #58 plus improvements on reporting of XMPP errors