Fixed improper equality checks.