Fixed error in pagination not calculating starting-page correctly