Fix vertex index bug on save