fix for dimension 2 in search/3