Fixed exit checking in hugChildren method.