Fix logic for page list