Fix to logging problem