Fix broken js pagination in a number of places

Fixes #98