Fixed issue with popup when used in node-webkit
Fixed issues with popup when used in node-webkit