Possible fix when opening a new window