Added missing 'child' variable