Fix ordered lists pagination issue (Fixes #597)