Fixed incorrect indexes