Autodetect start index