fix bugs related to ExpandoMetaClass