Limit pages displayed in pagination, Fixes #119