Fix improper logic check.