fixed slightly broken logging