Some cleanup, fix to new job state correctness