Fix passing of failed jobs to handler.