Fixed nasty component removal bug