Fixed a bug in wire