fix topology bugs