Fixed some issues in generating local imc ids.