Better checking for root vs child form