bug fix on Component deletion