Window open via javascript bug fix