Fix issue when remove the element