Fix accidental assignment instead of comparing variable