fixed reordering logic when moving items to be consistent with server