fix handling of tempest exit code