fixed logic for cout in case of pointer inited and uninvited.