Update parser for index, fix infinite loop