Fix scrolling issue

  Items were not scrolling because it calculation of number of items was wrong.