Fix termination of CocoaUI, send terminate instead of stop.