bugfix for wrong inheritance order