fix logging