Fixing search by type