Fix incorrect index