Merge with https://github.com/dm/pagination/commit/ea5bbfc9e366887a09d54a36711cb4655ac72092