update skeletonization

Fixed bugs.