Fixed bug that last page of results could not be accessed