Final fix for inherit issue

thanks to @setola