Makes changes to addcomponents to make it work