Fixed notebook testing return code handling bug