fixed the broken logging