fix warning condition