fixed the indices