Updated error message for parent nodes being undefined.