Fix to calculation of indexPath