Fixed client not closing on window close.