fix logging issues