fixed most problems accociated with paging