Fixed bug where generate component created more than 1 component