use StringBuffer for speedup
fixed not creating xmpp port