Fix to pagination mechanism