fix inherit loops error