fixed issue with removing element