Fixes pagination controls