fix terminate status issue