Bugfix of when logging to the terminal