Fixes a bug with the filter item removal.

Previously, clicking on the close button removed all the items.