Silly logical error, == instead of !=