Fix an erroneous error logging case.