fix bugs in Add/Remove Components