Fixed accidental assignment in if