fix queued job is restarted twice bug