better fix for node_env window.location issues