Fixed up IDT code