fixed update index error