Fix wrong index update [ci skip]