fix text index bug (upadte position)