Fix problem with inheritance