Potential bug fix when sending an error email with validation messages