Fix stirng_to_jid to handle lists properly