modifications in core to get inverted links working