Added circular inheritance prevention