query message and table sorting order synchronization - without changing ui behaviour