fix id ordering