Fixing bug for parent/child mismatches and typos