Fix crash on scroll and simplify scroll indexPath calculation algorithm