Bug fixes for long running jobs