More bugfixes to logger.