fix logging part 2