Calc indexPath on main thread.