Fixed pagination. Closes #2.