Added fix to avoid NPE in Application:111
Added escaping of <availableOrgIds> xml