fixing references to MAX_X_PER_PAGE constants