patched a dispatch job logical error
patched dispater for better mail-error-handling