Fix logging problem