fixing overflow of terms pop up