Another bug fix. index -> gIndex