Fix component system bugs