Fixed error when you go past the total pages. Closes #12.