
Handle window closing gracefully
