fix special case when component has only one child