fixed if the component is null then an empty page will be rendered