fix term comparison maths