logging bugfixes