fix bug in wire2pts().