NodeGui: prevent crash when quitting