Fix getIndex for older 2.0 versions.