Safly closed the window system at exit, prevents crashing
Fixed windows console size detection