Added case when there is no custom element