fix inheritence bug