Sync with ibf prototype.