Work-around for page-number calculation. Fixes #268 (Kind of)