Fix bug related to log