Fixed the left over errors in the pagination stuff

It goes 5 before, current and 5 after, now I'm going to change the forloop
to a foreach and hopefully only draw the necessary pages