FIX: some issues in topo_ratio computation