fix general key issue, be more selective removing edges