fixed bug in determining IDMap.Size()