Fix a bug with component removed event