Fix terminate process