fix not manifold errors