Fix bug with logger