Added Auto index detect