Close the window when the page reload page doesnt actually reload