another fix for filter by type