fixed a bug for the straight skeleton