make the tests pass and conditional job state update