fixed inheritance recursion