Fix bug for 0-width indices.