fix logging issue