Fixing next job bug after job is completed.