Bug fixing

Fixed some bugs after testing the pagination class