Node-Webkit window.close() closes wrong window only on one machine

I have a very strange bug. I have a function in my software made with node-webkit that basically reads my generated SVG, export it to a temp folder as a .svg, open a new window with that .svg, take a screenshot and save as .png onto a desired location, then closes the window while deleting the .svg. (Pretty hacky workaround but canvg solution / batik solution was too fat or buggy...)

The strange part is that this method of saving works on every machine I've tried... except one. Saving the svg works on 6 other machines in the office. I've even tried this saving method in 3 different virtual machines (Windows Vista, 7, 8.1 with nothing installed except for my software) and it worked. I am using an installer to install my software so installation is the same across all machines.

The bug itself is that Window.close() actually closes the main Node-Webkit window instead of the specified window. I have narrowed down the problem to one line of code-

  var new_win = gui.Window.open(absSvgPath, {
    min_width: 50,
    width: width + 40,
    height: height + 75
  });

  new_win.hide();

  window.setTimeout(function(){
    new_win.capturePage(function(img){
      var base64Data = img.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
      require("fs").writeFile(dst, base64Data, 'base64', function(err) {
        console.log(err);
      });
    },'png');
    new_win.focus();
    new_win.close(); // COMMENTING THIS LINE MAKES THE CODE WORK ON THE BUG MACHINE
    fs.delete(svgdst, function(){

    });
  }, 500);

so the new_win.close() is the problem- it closes my entire node-webkit instead of just the new_win. I have no clue why it does this on this machine only.

The machine is not that unique, it's a Windows 8.1 with not much else installed. It's using the same JRE (it's packaged with the software). Main difference is that the processor is an i3 unlike the other machines, but I don't see why that would cause problems.

Has anyone seen anything like this?