ugly fix to component destruction issue