fix strange exit