Fix conditional log