Fix logging issue