Logging bugfix