fix class scope ID bug