fixed pagination button detection