Fixed paging after input from @jesperbylund