fix conditional if there isn't a child