logging bugfix