Fix erros function CreateComponent