Fix es index replacement