Fix #1: rename initIndex to InitIndex