Fixed typo. Renamed `addIndex` to `addLength`.