Bug fix: filter by type