Fixed broken pagination