Fixes related to pagination