Fix non manifold in some circumstances