fixed bug for similar to class generation

.xor generates ^, but we must generate !=.