Fixed error with inherited classes.