Calculate size of terms correctly