Adding inherit edges but bugs with sorting