fixed filter by type query to retrieve by type, and not rely on type suffixes