Fix id & update index