Prevent non-integer numbers in links

I noticed that in the pagination links on one of my pages I was getting a "16.5", which leads to a broken link. This corrects it to 16.