fixed a pagination bug when current page < 1