fixed bug with clicking window.open