Fix to save search_type