Fix logic flaw.