preventing popup overflow on large counts