Fixing the get_catalog method to return a generator.