bugfix for when no items are selected