Fix issues with inheritance