fix inherits
merge from liuluying branch