Fix IdEncoder