Improve comparison of terms