fix: use indexes correctly for getting data