fix for topological sampling