Fixing data sanitization issue

Fixing issue where if the job failed the data was not properly sanitized.