avoid unexpected exit