Fix logic mistake.