fix error termination type