Added guard condition for component initialization;