job state better handling