fix job logic