removing window reference as it was crashing the node.js server