Fixing pagination for variables

Fixes broken pagination for the variables module.