Stops window closing when last tab is closed