fixed an exception while getting agency name