Fix to logging