Fix logging handling.