Fixed index-wrong reference