removed sys.exit; closing a frame terminates application