bug fixed : previous window close when opening new window