fix swift process restart problem