fixed some bugs for ICM