fix issue when adding a removed element