fix evelements bug when removing element