Fix bug for exception.