fixed issue when removing links