Fix pageSize compute bug