fix checking presence of origin