fix filtering by type