fix bug when no items present for layout