Fixed some inheritance problems