Fixed bug in class inheritance.