bug fix in pagination button