Ensure sorting work correctly in remote mode.