Fixed inheritance in classes