fix a memory access violation in icf