Bugfix with inheritance.