Fixed crash when adding new components