fix the bug when job finishes the flow not get updated until next job submission