Fixed inheritance issues

A weird debug assertion pops up.