fix indices of "hosts" arrays.