avoid crash on wrong remove