Fixed issue with dynamic inheritance