Fix bug for no log