Corrected specialization and id ordering