fix a bug, should use homotopic thinning