Fixing bugs in wire allocation